package com.yuwenxin.bean;

import com.yuwenxin.core.AuxiliaryTool;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashSet;

public class Album {
    private int id;
    private String albumName, corporationName;
    private String albumPhotoPath;
    private Date publishDate;

    private HashSet<Music> musicSet = new HashSet<>();  // 专辑与歌曲一对多的关系  这里规定专辑只能收录歌手的原创歌曲

    public String getAlbumPhotoPath() {
        return albumPhotoPath;
    }

    public void setAlbumPhotoPath(String albumPhotoPath) {
        this.albumPhotoPath = albumPhotoPath;
    }

    public HashSet<Music> getMusicSet() {
        return musicSet;
    }

    public void setMusicSet(HashSet<Music> musicSet) {
        this.musicSet = musicSet;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAlbumName() {
        return albumName;
    }

    public void setAlbumName(String albumName) {
        this.albumName = albumName;
    }

    public String getCorporationName() {
        return corporationName;
    }

    public void setCorporationName(String corporationName) {
        this.corporationName = corporationName;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }


    @Override
    public String toString() {
        return "Album{" +
                "id=" + id +
                ", albumName='" + albumName + '\'' +
                ", corporationName='" + corporationName + '\'' +
                ", albumPhotoPath='" + albumPhotoPath + '\'' +
                ", publishDate=" + AuxiliaryTool.dateToString(publishDate) +
                ", musicSet=" + musicSet +
                '}';
    }
}
